#pragma once
// #include "ocidl.h"

#define MEM_SIZE (400000000)


class Vector2D
{
protected:
  POINT    m_p1;
  POINT    m_p2;
  POINT    m_middle;

  double   m_a;
  double   m_b;

  double   m_lenght;
  double   m_product;
  double   m_normscalar;
  double   m_anglecommon;
  double   m_angleinterior;

  POINTF   m_normalizevect;
  POINT    m_sumvector;

  bool     m_lenInsesitive;

public:
  Vector2D();
  Vector2D(const POINT &, const POINT &);
  ~Vector2D();
  void SetVector(const POINT &, const POINT &);
  virtual int operator * (Vector2D &);
  virtual bool operator == (const Vector2D &);
  virtual bool operator != (const Vector2D &);
  virtual double GetLength();
  virtual bool CheckCollision(const Vector2D &, bool bAllpoints = true);
  virtual const POINT & GetCenterPoint();
  virtual double GetVectorAngleCommonBegin(Vector2D &);
  virtual double GetFollowVectorAngle(Vector2D &, bool );  //calculate the angle for vector in figure, the bool informs if the vectors are counter clockwise (true)
  virtual double  GetProduct(Vector2D &);
  virtual void    SetLengthInsensitive(bool);
                                                              //ordered to get interior angle
protected:
  virtual void CalculateParameters();
  virtual void CalculateNormalVectorProduct(const Vector2D &);
  virtual void CalculateNormalizeScalar(const Vector2D &);
  virtual void NormalizeVector();
  virtual void AddVector(const Vector2D &);
  virtual void CalculateLength();
  
};


